﻿

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;


public class BLL_tbl_rm_order_details
{
    public BLL_tbl_rm_order_details()
    {

    }

    public List<tbl_rm_order_details> select(int RM_DETAILS_ID)
    {
        DAL_tbl_rm_order_details dal = new DAL_tbl_rm_order_details();
        return dal.select(RM_DETAILS_ID);
    }

    public List<tbl_rm_order_details> selectAll()
    {
        DAL_tbl_rm_order_details dal = new DAL_tbl_rm_order_details();
        return dal.selectAll();
    }

    public bool insert(tbl_rm_order_details tbl)
    {
        DAL_tbl_rm_order_details dal = new DAL_tbl_rm_order_details();
        int i = 0;
        i = dal.insert(
            tbl.RM_ORDER_ID
, tbl.RAW_MATERIAL_ID
, tbl.QUANTITY_IN_KG
, tbl.PRICE_PER_KG
, tbl.IS_ACTIVE
, tbl.CREATED_BY
, tbl.CREATED_DATE
        );

        return Convert.ToBoolean(i);
    }


    public bool update(tbl_rm_order_details tbl)
    {
        DAL_tbl_rm_order_details dal = new DAL_tbl_rm_order_details();
        int i = 0;
        i = dal.update(
            tbl.RM_DETAILS_ID
, tbl.RM_ORDER_ID
, tbl.RAW_MATERIAL_ID
, tbl.QUANTITY_IN_KG
, tbl.PRICE_PER_KG
, tbl.IS_ACTIVE
, tbl.UPDATED_BY
, tbl.UPDATED_DATE
            );

        return Convert.ToBoolean(i);
    }


    public bool delete(tbl_rm_order_details tbl)
    {
        DAL_tbl_rm_order_details dal = new DAL_tbl_rm_order_details();
        int i = 0;
        i = dal.delete(
                tbl.RM_DETAILS_ID
        );

        return Convert.ToBoolean(i);
    }


}

